#pragma once

class Settings
{
public:
	Settings(void);
	~Settings(void);
	void SetDefault();
	int windowLength;
	int samplingRate;
	bool normalizeVocoder;

	class PitchTrackerSettings
	{
	public:
		PitchTrackerSettings(){}
		~PitchTrackerSettings(){}
		double amplitudeThreshold;
		double noiseThreshold;
	};
	PitchTrackerSettings* GetPitchTracker(){return &pitchTracker;}

	class CarrierSettings
	{
	public:
		CarrierSettings(){}
		~CarrierSettings(){}
		int frequency;
		int frequencyVariation;
		int brownNoise;
		int whiteNoise;
		int triangular;
		int square;
		int sawtooth;
		int sine;
		int random;
		int sineF2;
		int sineF3;
		int sineF4;
		int sineF5;
		int sineF6;
		int sineF7;
		int function1;
		int function2;
		int function3;
	};
	CarrierSettings* GetCarrier(){return &carrier;}

	class PlayerSettings
	{
	public:
		enum StreamType
		{
			Modulator = 0,
			Carrier,
			Vocoder
		};
		PlayerSettings(){}
		~PlayerSettings(){}
		bool shouldRecord;
		StreamType streamType;
	};
	PlayerSettings* GetPlayer(){return &player;}

	class VocoderSettings
	{
	public:
		VocoderSettings(){}
		~VocoderSettings(){}
		bool applySilence;
		int absSilenceThreshold;
		int minSilenceSamples;
		bool normalize;
		bool mixWithModulator;
		bool useModulatorAmplitude;
	};
	VocoderSettings* GetVocoder(){return &vocoder;}

private:
	PitchTrackerSettings pitchTracker;
	CarrierSettings carrier;
	PlayerSettings player;
	VocoderSettings vocoder;
};

class SettingsProvider
{
public:
	SettingsProvider(void){}
	~SettingsProvider(void){}
	virtual void UpdateSettings(Settings* settings) = 0;
};
